<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <div id="app">
        <ul>
            <li v-for="fruit in arr">
                {{ fruit }}
            </li>
        </ul>
        <hr>
        <ul>
            <li v-for="(fruit,index) in arr">
                {{index}}
                =>
                {{ fruit }}
            </li>
        </ul>
        <hr>
        <ul>
            <li v-for="(item,key,index) in json">
                {{key}}
                =>
                {{index}}
                =>
                {{item}}
            </li>
        </ul>
        <hr>
        <ul>
            <li v-for="(beauty,index) in  arr2">
                <p>
                    佳丽{{index+1}}:{{beauty.name}}
                </p>
                <p>
                    芳龄：{{beauty.age}}
                </p>
                <p>
                    美貌：{{beauty.beauty}}
                </p>
                <p>
                    婚否：{{beauty.isMarried}}
                </p>
            </li>
        </ul>
    </div>
    <script src="./vue.js"></script>
    <script>
        let vm = new Vue({
            el: "#app",
            data: {
                arr: ['apple', 'bananer', 'peal', 'tomato'],
                json: {
                    name: "小花",
                    age: 18,
                    beauty: "好看",
                    isMarried: "没有结婚，你还有机会"
                },
                arr2: [{
                    name: "小花",
                    age: 18,
                    beauty: "好看",
                    isMarried: "没有结婚，你还有机会"
                },
                {
                    name: "小美",
                    age: 19,
                    beauty: "好看",
                    isMarried: "已经结婚，你没有机会"
                },
                {
                    name: "小红",
                    age: 18,
                    beauty: "好看",
                    isMarried: "还没对象，你们赶紧行动"
                }
                ]
            }
        })
    </script>
</body>

</html>